include("shared.lua")

function ENT:Initialize()
end

function ENT:Draw()
	self.Entity:DrawModel()
	
	local Pos = self:GetPos()
	local Ang = self:GetAngles()
	
    local owner = self.dt.owning_ent
	owner = (IsValid(owner) and owner:Nick()) or "Disconnected"
	
	txt1 = "Money Printer"
	txt2 = "$" ..self:GetNWInt("PrintA")
	
	local font = "Trebuchet24"
	surface.SetFont(font)
	local TextWidth = surface.GetTextSize(txt1)
	local TextWidth2 = surface.GetTextSize(txt2)
	local TextWidth3, texty = surface.GetTextSize(owner)
	
	Ang:RotateAroundAxis(Ang:Up(), 90)
	
	local invisible = Color(0,0,0, 0)
	local backColor = Color(150,150,150,255)
	cam.Start3D2D(Pos + Ang:Up()*3.1, Ang, 0.11)
	    draw.WordBox(2, -TextWidth3*0.5, -texty-10, owner, font, invisible, backColor)
		draw.WordBox(2, -TextWidth*0.5, -10, txt1, font, invisible, backColor)
		draw.WordBox(2, -TextWidth2*0.5, texty-10, txt2, font, invisible, Color(200,40,40,255))
	cam.End3D2D()
end

function ENT:Think()
end
